package com.center.biz.impl;

import com.center.api.model.EduCourseKpoint;
import com.center.api.remote.RemoteEduCourseKpointService;
import com.center.biz.dao.EduCourseKpointMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduCourseKpointService.class)
public class RemoteEduCourseKpointServiceImpl implements RemoteEduCourseKpointService {

    @Autowired
    private EduCourseKpointMapper eduCourseKpointMapper;
    @Override
    public int save(EduCourseKpoint eduCourseKpoint) {
        return this.eduCourseKpointMapper.insertSelective(eduCourseKpoint);
    }

    @Override
    public int delete(int id) {
        return this.eduCourseKpointMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int update(EduCourseKpoint eduCourseKpoint) {
        return this.eduCourseKpointMapper.updateByPrimaryKeySelective(eduCourseKpoint);
    }

    @Override
    public EduCourseKpoint getById(int id) {
        return this.eduCourseKpointMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<EduCourseKpoint> select(EduCourseKpoint eduCourseKpoint) {
        return this.eduCourseKpointMapper.select(eduCourseKpoint);
    }
}
